package sdk8.mathuse;

import java.math.BigDecimal;

public class BigDecimalDemo1 {
    public static void main(String[] args) {
        BigDecimal b1 = new BigDecimal("10");
        System.out.println(b1);
        double d = 10.01;
        BigDecimal b2 = BigDecimal.valueOf(d);
        System.out.println(b2);

        //相减
        BigDecimal b3 = b2.subtract(b1);
        System.out.println(b3.toString());
    }
}
